package com.block.product.service.utils;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;

public class YueDaiBaoUtils {

    public static Integer getLoanAmount(String loanAmount) {
        if(StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la002.getValue(),loanAmount) || BaseTypeInfoEnum.LoanAmount.la001.getValue().equals(loanAmount)){
            return 1;
        }if(StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la003.getValue(),loanAmount)){
            return 2;
        }
        return 3;
    }

    public static Integer getLoanTime(String loanTime) {
        if(StrUtil.equals(BaseTypeInfoEnum.LoanTime.lt001.getValue(),loanTime)){
            return 3;
        }
        return 12;
    }

    public static Integer getJob(String gongzuo) {
        if(StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz001.getValue(),gongzuo)){
            return 1;
        }if(StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz002.getValue(),gongzuo)){
            return 3;
        }if(StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz004.getValue(),gongzuo)){
            return 4;
        }
        return 2;
    }

    public static Integer getSalaryPay(String shouru) {
        if(StrUtil.equals(BaseTypeInfoEnum.Shouru.sr001.getValue(),shouru)){
            return 1;
        }
        return 2;
    }

    public static Integer getHouse(String house) {
        if(StrUtil.equals(BaseTypeInfoEnum.House.hu001.getValue(),house)){
            return 2;
        }
        return 1;
    }

    public static Integer getCar(String car) {
        if(StrUtil.equals(BaseTypeInfoEnum.Car.car001.getValue(),car)){
            return 2;
        }
        return 1;
    }

    public static Integer getSheBao(String shebao) {
        if(StrUtil.equals(BaseTypeInfoEnum.Shebao.sb001.getValue(),shebao)){
            return 4;
        }if(StrUtil.equals(BaseTypeInfoEnum.Shebao.sb002.getValue(),shebao)){
            return 1;
        }
        return 2;
    }

    public static Integer getGjj(String gjj) {
        if(StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj001.getValue(),gjj)){
            return 4;
        }if(StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj002.getValue(),gjj)){
            return 1;
        }
        return 2;
    }

    public static Integer getBaoXian(String baoxian) {
        if(StrUtil.equals(BaseTypeInfoEnum.Baoxian.bx001.getValue(),baoxian)){
            return 1;
        }
        return 2;
    }

    public static Integer getZhiMa(String zhima) {
        if( StrUtil.equals(BaseTypeInfoEnum.Zhima.zm001.getValue(),zhima) || BaseTypeInfoEnum.Zhima.zm002.getValue().equals(zhima)){
            return 4;
        }
        if(StrUtil.equals(BaseTypeInfoEnum.Zhima.zm003.getValue(),zhima)){
            return 3;
        }
        if(StrUtil.equals(BaseTypeInfoEnum.Zhima.zm004.getValue(),zhima)){
            return 2;
        }
        return 1;
    }

    public static Integer getYuQi(String yuqi) {
        if(StrUtil.equals(BaseTypeInfoEnum.Yuqi.yq001.getValue(),yuqi)){
            return 1;
        }
        return 2;
    }
}
